import Cookies from "js-cookie";

const TokenKey = "vue_admin_template_token";
const Home = "vue_admin_home";
const AdmimSwitch = "vue_admin_switch";

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}

export function setIsHome(isHome) {
  return Cookies.set(Home, isHome);
}

export function getIsHome() {
  return Cookies.get(Home);
}

export function removeIsHome() {
  return Cookies.remove(Home);
}

export function setAdminSwitch(data = 1) {
  return Cookies.set(AdmimSwitch, data);
}

export function getAdminSwitch() {
  return Cookies.get(AdmimSwitch);
}

export function removeAdminSwitch() {
  return Cookies.remove(AdmimSwitch);
}
